import { defineStore } from "pinia";

import {systemRoutes} from "@/router/modeles/systemRoutes"
import {personal} from "@/router/modeles/personal"
// const router=systemRoutes.find(({path})=>path==="/dashboard").children
const router=[...systemRoutes,...personal].filter(item=>{
	if(item.name!=="notFound"){
		return true
	}
})
export const useStore=defineStore("router",{
	state:()=>({
		router:[...systemRoutes,...personal]
	}),
	actions:{

	},
    // persist: {
    //   key: 'storekey', //缓存key
    //   storage: window.sessionStorage, //缓存方式
    //   // 部分持久化状态的点符号路径数组，默认持久化所有数据 
    //   paths: ['username',"isLogin","token"],  //持久化counter 字段
    // }
})